package com.xoa.controller.seal;

import com.xoa.model.seal.SealJinge;
import com.xoa.service.seal.SealJingeSevice;
import com.xoa.util.ToJson;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;


/**
 * Created by 刘新婷 on 2018-01-12.
 * 金格签章管理接口
 */
@Controller
@RequestMapping("/sealJinge")
public class SealJingeController {

    @Resource
    SealJingeSevice sealJingeSevice;

   //新增签章
    @ResponseBody
    @RequestMapping("/addSealJinge")
    public ToJson<SealJinge> addSealJinge(HttpServletRequest req, SealJinge sealJinge) {
        return sealJingeSevice.addSealJinge(req, sealJinge);
    }

    //签章管理列表查询
    @ResponseBody
    @RequestMapping("/getSealJingeList")
    public ToJson<SealJinge> getSealJingeList(){
        return sealJingeSevice.getSealJingeList();
    }

    //查询签章详情
    @ResponseBody
    @RequestMapping("/getSealJinge")
    public ToJson<SealJinge> getSealJinge(Integer sealId){
        return sealJingeSevice.getSealJinge(sealId);
    }

    //修改签章
    @ResponseBody
    @RequestMapping("/updateSealJinge")
    public ToJson<SealJinge> updateSealJinge(SealJinge sealJinge){
        return sealJingeSevice.updateSealJinge(sealJinge);
    }

    //删除签章
    @ResponseBody
    @RequestMapping("/deleteSealJinge")
    public ToJson<SealJinge> deleteSealJinge(Integer sealId){
        return sealJingeSevice.deleteSealJinge(sealId);
    }
}
